package com.xccwk;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xccwk.constats.Constants;
import com.xccwk.model.User;

/**
 * Servlet implementation class SelectVuageServlet
 */

@WebServlet("/vuage")
public class SelectVuageServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    public SelectVuageServlet() {
        super();
    }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		List<User> listUser;
		String like= request.getParameter("like");
		System.out.println(like);
		listUser=Constants.imp.avageSelect(Constants.sql_vague,like);
		//System.out.println(listUser.toString());
		request.getSession().setAttribute("listUser",listUser);
		response.sendRedirect("login.jsp");
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

}
